package io.binghe.im.openai.application.dubbo;

import io.binghe.im.openai.common.constants.OpenAIConstants;
import io.binghe.im.openai.domain.service.OpenAIInteractiveService;
import io.binghe.im.openai.dubbo.service.OpenAIDubboService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author binghe(微信 : hacker_binghe)
 * @version 1.0.0
 * @description Dubbo接口实现类
 * @github https://github.com/binghe001
 * @copyright 公众号: 冰河技术
 */
@Component
@DubboService(version = OpenAIConstants.DEFAULT_DUBBO_VERSION)
public class OpenAIDubboServiceImpl implements OpenAIDubboService {
    @Autowired
    private OpenAIInteractiveService openAIInteractiveService;

    @Override
    public String sendMessage(String requestData) throws IOException {
        return openAIInteractiveService.sendMessage(requestData);
    }
}
